Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mam/iq fin transformations #3191

Merged
merged 3 commits into from
Jul 22, 2021
Merged

Mam/iq fin transformations #3191

merged 3 commits into from
Jul 22, 2021

Conversation

NelsonVides
Copy link
Collaborator

Sometimes it can be useful to be able to add information to a mam query, that doesn't belong to any specific message but to all of them. So being able to add subelements to the iq-fin element will solve the extensibility issue.

@mongoose-im
Copy link
Collaborator

mongoose-im commented Jul 21, 2021

small_tests_23 / small_tests / ddf25a9
Reports root / small


internal_mnesia / internal_mnesia / ddf25a9
Reports root/ big
OK: 1587 / Failed: 0 / User-skipped: 286 / Auto-skipped: 0


small_tests_24 / small_tests / ddf25a9
Reports root / small


small_tests_22 / small_tests / ddf25a9
Reports root / small


dynamic_domains / pgsql_mnesia / ddf25a9
Reports root/ big
OK: 1585 / Failed: 0 / User-skipped: 111 / Auto-skipped: 0


ldap_mnesia_22 / ldap_mnesia / ddf25a9
Reports root/ big
OK: 1514 / Failed: 0 / User-skipped: 359 / Auto-skipped: 0


ldap_mnesia_23 / ldap_mnesia / ddf25a9
Reports root/ big
OK: 1514 / Failed: 0 / User-skipped: 359 / Auto-skipped: 0


ldap_mnesia_24 / ldap_mnesia / ddf25a9
Reports root/ big
OK: 1514 / Failed: 0 / User-skipped: 359 / Auto-skipped: 0


elasticsearch_and_cassandra_24 / elasticsearch_and_cassandra_mnesia / ddf25a9
Reports root/ big
OK: 1890 / Failed: 0 / User-skipped: 282 / Auto-skipped: 0


pgsql_mnesia_24 / pgsql_mnesia / ddf25a9
Reports root/ big
OK: 3084 / Failed: 0 / User-skipped: 184 / Auto-skipped: 0


mssql_mnesia_24 / odbc_mssql_mnesia / ddf25a9
Reports root/ big
OK: 3084 / Failed: 0 / User-skipped: 184 / Auto-skipped: 0


pgsql_mnesia_22 / pgsql_mnesia / ddf25a9
Reports root/ big
OK: 3084 / Failed: 0 / User-skipped: 184 / Auto-skipped: 0


elasticsearch_and_cassandra / elasticsearch_and_cassandra_mnesia / ddf25a9
Reports root/ big
OK: 1890 / Failed: 0 / User-skipped: 282 / Auto-skipped: 0


mssql_mnesia / odbc_mssql_mnesia / ddf25a9
Reports root/ big
OK: 3084 / Failed: 0 / User-skipped: 184 / Auto-skipped: 0


mysql_redis / mysql_redis / ddf25a9
Reports root/ big
OK: 3067 / Failed: 0 / User-skipped: 201 / Auto-skipped: 0


pgsql_mnesia / pgsql_mnesia / ddf25a9
Reports root/ big
OK: 3084 / Failed: 0 / User-skipped: 184 / Auto-skipped: 0


mysql_redis_24 / mysql_redis / ddf25a9
Reports root/ big
OK: 3078 / Failed: 1 / User-skipped: 201 / Auto-skipped: 0

pep_SUITE:pep_tests:unsubscribe_after_presence_unsubscription
{error,
  {{badmatch,
     [{xmlel,<<"message">>,
        [{<<"from">>,
        <<"alice_unsubscribe_after_presence_unsubscription_82.25958@localhost">>},
         {<<"to">>,
        <<"bob_unsubscribe_after_presence_unsubscription_82.25958@localhost/res1">>},
         {<<"type">>,<<"headline">>}],
        [{xmlel,<<"event">>,
           [{<<"xmlns">>,
           <<"http://jabber.org/protocol/pubsub#event">>}],
           [{xmlel,<<"items">>,
            [{<<"node">>,<<"Rb3IeYVv4701XBNfJoMZbA==">>}],
            [{xmlel,<<"item">>,
               [{<<"id">>,<<"salmon">>}],
               [{xmlel,<<"entry">>,
                  [{<<"xmlns">>,
                  <<"http://www.w3.org/2005/Atom">>}],
                  []}]}]}]},
         {xmlel,<<"headers">>,
           [{<<"xmlns">>,<<"http://jabber.org/protocol/shim">>}],
           []}]}]},
   [{pep_SUITE,'-unsubscribe_after_presence_unsubscription/1-fun-0-',2,
      [{file,"/home/circleci/app/big_tests/tests/pep_SUITE.erl"},
       {line,382}]},
    {escalus_story,story,4,
      [{file,
         "/home/circleci/app/big_tests/_build/default/lib/escalus/src/escalus_story.erl"},
       {line,72}]},
    {test_server,ts_tc,3,[{file,"test_server.erl"},{line,1783}]},
    {test_server,run_test_case_eval1,6,
      [{file,"test_server.erl"},{line,1292}]},
    {test_server,run_test_case_eval,9,
      [{file,"test_server.erl"},{line,1224}]}]}}

Report log


riak_mnesia_24 / riak_mnesia / ddf25a9
Reports root/ big
OK: 1737 / Failed: 0 / User-skipped: 285 / Auto-skipped: 0


riak_mnesia / riak_mnesia / ddf25a9
Reports root/ big
OK: 1737 / Failed: 0 / User-skipped: 285 / Auto-skipped: 0

@codecov
Copy link

codecov bot commented Jul 21, 2021

Codecov Report

Merging #3191 (2a30417) into master (e57010d) will increase coverage by 0.00%.
The diff coverage is 90.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #3191   +/-   ##
=======================================
  Coverage   80.32%   80.33%           
=======================================
  Files         397      397           
  Lines       32430    32436    +6     
=======================================
+ Hits        26051    26057    +6     
  Misses       6379     6379           
Impacted Files Coverage Δ
src/mam/mod_mam_meta.erl 93.68% <ø> (ø)
src/mam/mod_mam_utils.erl 89.73% <66.66%> (-0.24%) ⬇️
src/mam/mod_mam.erl 88.98% <100.00%> (+0.04%) ⬆️
src/mam/mod_mam_muc.erl 74.01% <100.00%> (+0.12%) ⬆️
src/mam/mod_mam_params.erl 86.66% <100.00%> (+0.95%) ⬆️
...bal_distrib/mod_global_distrib_hosts_refresher.erl 71.69% <0.00%> (-1.89%) ⬇️
src/cassandra/mongoose_cassandra_worker.erl 73.23% <0.00%> (-0.47%) ⬇️
src/pubsub/mod_pubsub.erl 73.17% <0.00%> (-0.06%) ⬇️
src/mod_muc_log.erl 77.88% <0.00%> (ø)
src/mod_muc_room.erl 77.12% <0.00%> (+0.17%) ⬆️
... and 1 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e57010d...2a30417. Read the comment docs.

@mongoose-im
Copy link
Collaborator

mongoose-im commented Jul 21, 2021

small_tests_23 / small_tests / 2a30417
Reports root / small


internal_mnesia / internal_mnesia / 2a30417
Reports root/ big
OK: 1587 / Failed: 0 / User-skipped: 286 / Auto-skipped: 0


small_tests_24 / small_tests / 2a30417
Reports root / small


dynamic_domains / pgsql_mnesia / 2a30417
Reports root/ big
OK: 1585 / Failed: 0 / User-skipped: 111 / Auto-skipped: 0


small_tests_22 / small_tests / 2a30417
Reports root / small


ldap_mnesia_24 / ldap_mnesia / 2a30417
Reports root/ big
OK: 1514 / Failed: 0 / User-skipped: 359 / Auto-skipped: 0


ldap_mnesia_22 / ldap_mnesia / 2a30417
Reports root/ big
OK: 1517 / Failed: 1 / User-skipped: 359 / Auto-skipped: 0

mod_global_distrib_SUITE:multi_connection:test_muc_conversation_history
{error,
  {{assertion_failed,assert,is_stanza_from,
     [<<"[email protected]/alicE_test_muc_conversation_history_22.672877">>],
     {xmlel,<<"presence">>,
       [{<<"from">>,
         <<"[email protected]/eve_test_muc_conversation_history_22.724182">>},
        {<<"to">>,
         <<"eve_test_muc_conversation_history_22.724182@localhost/res1">>},
        {<<"type">>,<<"error">>},
        {<<"xml:lang">>,<<"en">>}],
       [{xmlel,<<"x">>,
          [{<<"xmlns">>,<<"http://jabber.org/protocol/muc">>}],
          []},
        {xmlel,<<"error">>,
          [{<<"code">>,<<"503">>},{<<"type">>,<<"cancel">>}],
          [{xmlel,<<"service-unavailable">>,
             [{<<"xmlns">>,
             <<"urn:ietf:params:xml:ns:xmpp-stanzas">>}],
             []}]}]},
     "<presence from='[email protected]/eve_test_muc_conversation_history_22.724182' to='eve_test_muc_conversation_history_22.724182@localhost/res1' type='error' xml:lang='en'><x xmlns='http://jabber.org/protocol/muc'/><error code='503' type='cancel'><service-unavailable xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/></error></presence>"},
   [{escalus_new_assert,assert_true,2,
      [{file,
         "/home/circleci/app/big_tests/_build/default/lib/escalus/src/escalus_new_assert.erl"},
       {line,84}]},
    {mod_global_distrib_SUITE,wait_for_muc_presence,3,
      [{file,
         "/h...

Report log


pgsql_mnesia_24 / pgsql_mnesia / 2a30417
Reports root/ big
OK: 3084 / Failed: 0 / User-skipped: 184 / Auto-skipped: 0


elasticsearch_and_cassandra_24 / elasticsearch_and_cassandra_mnesia / 2a30417
Reports root/ big
OK: 1890 / Failed: 0 / User-skipped: 282 / Auto-skipped: 0


ldap_mnesia_23 / ldap_mnesia / 2a30417
Reports root/ big
OK: 1514 / Failed: 0 / User-skipped: 359 / Auto-skipped: 0


pgsql_mnesia / pgsql_mnesia / 2a30417
Reports root/ big
OK: 3084 / Failed: 0 / User-skipped: 184 / Auto-skipped: 0


elasticsearch_and_cassandra / elasticsearch_and_cassandra_mnesia / 2a30417
Reports root/ big
OK: 1890 / Failed: 0 / User-skipped: 282 / Auto-skipped: 0


pgsql_mnesia_22 / pgsql_mnesia / 2a30417
Reports root/ big
OK: 3084 / Failed: 0 / User-skipped: 184 / Auto-skipped: 0


mysql_redis_24 / mysql_redis / 2a30417
Reports root/ big
OK: 3067 / Failed: 0 / User-skipped: 201 / Auto-skipped: 0


mssql_mnesia / odbc_mssql_mnesia / 2a30417
Reports root/ big
OK: 3084 / Failed: 0 / User-skipped: 184 / Auto-skipped: 0


mssql_mnesia_24 / odbc_mssql_mnesia / 2a30417
Reports root/ big
OK: 3084 / Failed: 0 / User-skipped: 184 / Auto-skipped: 0


mysql_redis / mysql_redis / 2a30417
Reports root/ big
OK: 3067 / Failed: 0 / User-skipped: 201 / Auto-skipped: 0


riak_mnesia_24 / riak_mnesia / 2a30417
Reports root/ big
OK: 1737 / Failed: 0 / User-skipped: 285 / Auto-skipped: 0


riak_mnesia / riak_mnesia / 2a30417
Reports root/ big
OK: 1772 / Failed: 3 / User-skipped: 285 / Auto-skipped: 0

jingle_SUITE:all:resp_4xx_from_sip_proxy_results_in_session_terminate
{error,
  {{assertion_failed,assert,is_iq_result,
     {xmlel,<<"iq">>,
       [{<<"from">>,<<"error.480@localhost">>},
        {<<"to">>,
         <<"alice_resp_4xx_from_sip_proxy_results_in_session_terminate_97.770221@localhost/res1">>},
        {<<"id">>,<<"5f979736-6822-4818-93f6-a444919c5faf">>},
        {<<"type">>,<<"set">>}],
       [{xmlel,<<"jingle">>,
          [{<<"xmlns">>,<<"urn:xmpp:jingle:1">>},
           {<<"action">>,<<"session-terminate">>},
           {<<"sid">>,<<"a8b168e7-1e9c-4857-9d8c-4016c5c8f43d">>}],
          [{xmlel,<<"reason">>,[],
             [{xmlel,<<"general-error">>,[],[]},
            {xmlel,<<"sip-error">>,
              [{<<"code">>,<<"480">>}],
              [{xmlcdata,<<"Temporarily Unavailable">>}]}]}]}]},
     "<iq from='error.480@localhost' to='alice_resp_4xx_from_sip_proxy_results_in_session_terminate_97.770221@localhost/res1' id='5f979736-6822-4818-93f6-a444919c5faf' type='set'><jingle xmlns='urn:xmpp:jingle:1' action='session-terminate' sid='a8b168e7-1e9c-4857-9d8c-4016c5c8f43d'><reason><general-error/><sip-error code='480'>Temporarily Unavailable</sip-error></reason></jingle></iq>"},
   [{escalus_new_assert,assert_true,2,
      [{file,
         "/home/circleci/app/big_tests/_build/default/lib/escalus/src/escalus_new_assert.erl"},
       {line,84}]},
    {jingle_SUITE,send_initiate_and_wait_for_first_iq_set,2,
      [{file,"/home/circleci/app/big_tests/tests/jingle_SUITE.erl"},
       {line,393}]},
    {jingle_SUITE,
      '-res...

Report log

jingle_SUITE:all:resp_4xx_from_sip_proxy_results_in_session_terminate
{error,
  {{assertion_failed,assert,is_iq_result,
     {xmlel,<<"iq">>,
       [{<<"from">>,<<"error.480@localhost">>},
        {<<"to">>,
         <<"alice_resp_4xx_from_sip_proxy_results_in_session_terminate_8.150941@localhost/res1">>},
        {<<"id">>,<<"5aff08e2-474f-43d3-a805-a24a0b94ba23">>},
        {<<"type">>,<<"set">>}],
       [{xmlel,<<"jingle">>,
          [{<<"xmlns">>,<<"urn:xmpp:jingle:1">>},
           {<<"action">>,<<"session-terminate">>},
           {<<"sid">>,<<"ad0f2812-9db7-495d-89c0-41ac4a7a888e">>}],
          [{xmlel,<<"reason">>,[],
             [{xmlel,<<"general-error">>,[],[]},
            {xmlel,<<"sip-error">>,
              [{<<"code">>,<<"480">>}],
              [{xmlcdata,<<"Temporarily Unavailable">>}]}]}]}]},
     "<iq from='error.480@localhost' to='alice_resp_4xx_from_sip_proxy_results_in_session_terminate_8.150941@localhost/res1' id='5aff08e2-474f-43d3-a805-a24a0b94ba23' type='set'><jingle xmlns='urn:xmpp:jingle:1' action='session-terminate' sid='ad0f2812-9db7-495d-89c0-41ac4a7a888e'><reason><general-error/><sip-error code='480'>Temporarily Unavailable</sip-error></reason></jingle></iq>"},
   [{escalus_new_assert,assert_true,2,
      [{file,
         "/home/circleci/app/big_tests/_build/default/lib/escalus/src/escalus_new_assert.erl"},
       {line,84}]},
    {jingle_SUITE,send_initiate_and_wait_for_first_iq_set,2,
      [{file,"/home/circleci/app/big_tests/tests/jingle_SUITE.erl"},
       {line,393}]},
    {jingle_SUITE,
      '-resp_...

Report log

jingle_SUITE:all:resp_4xx_from_sip_proxy_results_in_session_terminate
{error,
  {{assertion_failed,assert,is_iq_result,
     {xmlel,<<"iq">>,
       [{<<"from">>,<<"error.480@localhost">>},
        {<<"to">>,
         <<"alice_resp_4xx_from_sip_proxy_results_in_session_terminate_19.87265@localhost/res1">>},
        {<<"id">>,<<"8dea62b3-1cc1-425a-8beb-b178ee4a6391">>},
        {<<"type">>,<<"set">>}],
       [{xmlel,<<"jingle">>,
          [{<<"xmlns">>,<<"urn:xmpp:jingle:1">>},
           {<<"action">>,<<"session-terminate">>},
           {<<"sid">>,<<"e899eb5f-c7c1-4d34-96ad-9edcb615e13a">>}],
          [{xmlel,<<"reason">>,[],
             [{xmlel,<<"general-error">>,[],[]},
            {xmlel,<<"sip-error">>,
              [{<<"code">>,<<"480">>}],
              [{xmlcdata,<<"Temporarily Unavailable">>}]}]}]}]},
     "<iq from='error.480@localhost' to='alice_resp_4xx_from_sip_proxy_results_in_session_terminate_19.87265@localhost/res1' id='8dea62b3-1cc1-425a-8beb-b178ee4a6391' type='set'><jingle xmlns='urn:xmpp:jingle:1' action='session-terminate' sid='e899eb5f-c7c1-4d34-96ad-9edcb615e13a'><reason><general-error/><sip-error code='480'>Temporarily Unavailable</sip-error></reason></jingle></iq>"},
   [{escalus_new_assert,assert_true,2,
      [{file,
         "/home/circleci/app/big_tests/_build/default/lib/escalus/src/escalus_new_assert.erl"},
       {line,84}]},
    {jingle_SUITE,send_initiate_and_wait_for_first_iq_set,2,
      [{file,"/home/circleci/app/big_tests/tests/jingle_SUITE.erl"},
       {line,393}]},
    {jingle_SUITE,
      '-resp_...

Report log


riak_mnesia / riak_mnesia / 2a30417
Reports root/ big
OK: 1737 / Failed: 0 / User-skipped: 285 / Auto-skipped: 0

Copy link
Contributor

@vkatsuba vkatsuba left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Only for notes: need create s separate PR for describe new config option extra_fin_element and similar like extra_params_module etc. in documentation of MIM.

@vkatsuba vkatsuba merged commit fa5b78c into master Jul 22, 2021
@vkatsuba vkatsuba deleted the mam/iq_fin_transformations branch July 22, 2021 12:06
@Premwoik Premwoik added this to the 5.0.0 milestone Oct 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants